sh/jshn.sh - json_cleanup() dont pollute env with local vars
authorBastian Bittorf <[email protected]>
Sun, 20 Apr 2014 20:55:48 +0000 (22:55 +0200)
committerFelix Fietkau <[email protected]>
Sat, 26 Apr 2014 19:30:33 +0000 (21:30 +0200)
this script is mostly sourced, so we should try to keep the pollution
of the users environment as low as possible. make the var 'tmp' local

Signed-off-by: Bastian Bittorf <[email protected]>
sh/jshn.sh

index b3cd43c7d05844af414c925c3b3b02ccc99a6b99..06ba96535b22045c84abe066d1a62b875b90f90c 100644 (file)
@@ -103,7 +103,7 @@ json_set_namespace() {
 }
 
 json_cleanup() {
-       local unset
+       local unset tmp
 
        _json_get_var unset JSON_UNSET
        for tmp in $unset JSON_VAR; do